import { createSlice } from '@reduxjs/toolkit'
const petTypeStore = createSlice({
    name: 'petType',
    initialState: {
        // 初始化状态
        type: 0
    },
    reducers: {
        // 定义reducer
        setPetType: (state, action) => {
            state.type = action.payload
        }
    },

})
const { actions } = petTypeStore
const { setPetType } = actions
export { setPetType }
export default petTypeStore.reducer